<template>
  <view class="home layout-column">
    <van-swipe type="single" :height="180">
      <van-swipe-item default="@/static/home/banner.jpg">
        <image style="width: 100%" src="@/static/home/banner.jpg" />
      </van-swipe-item>
    </van-swipe>
         <!-- <template #icon> 
        <image style="width: 100%" src="@/static/home/item1.png" />
      </template> -->
    <van-grid :column-num="2">
      <van-grid-item
        icon="orders-o"
        @click="onClick('/pages/spotCheck/index')"
        text="设备点检"
      />
      <van-grid-item icon="label-o" @click="onClick('/pages/repairRequest/index')" text="维修申请" />
      <van-grid-item icon="label-o" @click="onClick('/pages/maintain/index')" text="维修任务" />
      <van-grid-item icon="newspaper-o" @click="onClick('/pages/maintenance/index')" text="保养任务" />
    </van-grid>
  </view>
  <TabBar :active="0" />
</template>

<script>
import TabBar from "@/components/tab-bar.vue";
import {} from "@/api/home.js";
import { mapGetters } from "vuex";
import { Notify, Toast } from "vant";
export default {
  components: {
    TabBar,
  },
  data() {
    return {
      loading: false,
    };
  },
  computed: {
    ...mapGetters(["userInfo"]),
  },
  onLoad() {},
  mounted() {},
  methods: {
    onClick(url) {
      uni.navigateTo({
        url,
      });
    },
  },
};
</script>

<style lang="scss" scoped>
.home {
  height: calc(100% - var(--van-tabbar-height));
}
</style>
